package se.gu.sem;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class SplashScreen extends Activity {

	
	private Button GUbtn;
	private Button CHbtn;
	
	
	 @Override
	    public void onCreate(Bundle savedInstanceState) {
	        super.onCreate(savedInstanceState);

	        
	        setContentView(R.layout.splashscreen);
	        setupViews();
	        
	    }
	 
	 
	 
	 private void setupViews(){
		 
		 
		 GUbtn = (Button)findViewById(R.id.GUButton);
		 CHbtn = (Button)findViewById(R.id.CHButton);
		 
		 
		 GUbtn.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				
				GUApp univ = ((GUApp)getApplicationContext());
				univ.setUniv("GU");
				univ.setView("main");
				
	    	   Intent intent = new Intent(SplashScreen.this,LoadingScreen.class);
	    	   startActivity(intent);    
				
				
			}
		});
		 
		 
		 
		 CHbtn.setOnClickListener(new View.OnClickListener() {
				
			@Override
			public void onClick(View v) {
				
				GUApp univ = ((GUApp)getApplicationContext());
				univ.setUniv("CH");
				univ.setView("main");
				
				Intent intent = new Intent(SplashScreen.this,LoadingScreen.class);
				
	    	    startActivity(intent);    
				
				
			}
		});
		 
	 }
	
}
